Optimal. Leaf size=59 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )}{(a-b)^{3/2}}-\frac{\cot (x)}{(a-b) \sqrt{a+b \cot ^2(x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0957071, antiderivative size = 59, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.235, Rules used = {3670, 471, 377, 203} \[ \frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )}{(a-b)^{3/2}}-\frac{\cot (x)}{(a-b) \sqrt{a+b \cot ^2(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3670
Rule 471
Rule 377
Rule 203
Rubi steps
\begin{align*} \int \frac{\cot ^2(x)}{\left (a+b \cot ^2(x)\right )^{3/2}} \, dx &=-\operatorname{Subst}\left (\int \frac{x^2}{\left (1+x^2\right ) \left (a+b x^2\right )^{3/2}} \, dx,x,\cot (x)\right )\\ &=-\frac{\cot (x)}{(a-b) \sqrt{a+b \cot ^2(x)}}+\frac{\operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right ) \sqrt{a+b x^2}} \, dx,x,\cot (x)\right )}{a-b}\\ &=-\frac{\cot (x)}{(a-b) \sqrt{a+b \cot ^2(x)}}+\frac{\operatorname{Subst}\left (\int \frac{1}{1-(-a+b) x^2} \, dx,x,\frac{\cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )}{a-b}\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \cot (x)}{\sqrt{a+b \cot ^2(x)}}\right )}{(a-b)^{3/2}}-\frac{\cot (x)}{(a-b) \sqrt{a+b \cot ^2(x)}}\\ \end{align*}
Mathematica [B] time = 0.721489, size = 137, normalized size = 2.32 \[ \frac{(b-a) \cot (x) \sqrt{\frac{b \cot ^2(x)}{a}+1}+\frac{1}{2} \csc (x) \sec (x) ((a-b) \cos (2 x)-a-b) \sqrt{-\frac{(a-b) \cot ^2(x)}{a}} \tanh ^{-1}\left (\frac{\sqrt{-\frac{(a-b) \cot ^2(x)}{a}}}{\sqrt{\frac{b \cot ^2(x)}{a}+1}}\right )}{(a-b)^2 \sqrt{a+b \cot ^2(x)} \sqrt{\frac{b \cot ^2(x)}{a}+1}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.021, size = 99, normalized size = 1.7 \begin{align*} -{\frac{\cot \left ( x \right ) }{a}{\frac{1}{\sqrt{a+b \left ( \cot \left ( x \right ) \right ) ^{2}}}}}+{\frac{1}{ \left ( a-b \right ) ^{2}{b}^{2}}\sqrt{{b}^{4} \left ( a-b \right ) }\arctan \left ({ \left ( a-b \right ){b}^{2}\cot \left ( x \right ){\frac{1}{\sqrt{{b}^{4} \left ( a-b \right ) }}}{\frac{1}{\sqrt{a+b \left ( \cot \left ( x \right ) \right ) ^{2}}}}} \right ) }-{\frac{b\cot \left ( x \right ) }{a \left ( a-b \right ) }{\frac{1}{\sqrt{a+b \left ( \cot \left ( x \right ) \right ) ^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 3.00837, size = 884, normalized size = 14.98 \begin{align*} \left [-\frac{{\left ({\left (a - b\right )} \cos \left (2 \, x\right ) - a - b\right )} \sqrt{-a + b} \log \left (-2 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (2 \, x\right )^{2} - 2 \,{\left ({\left (a - b\right )} \cos \left (2 \, x\right ) - b\right )} \sqrt{-a + b} \sqrt{\frac{{\left (a - b\right )} \cos \left (2 \, x\right ) - a - b}{\cos \left (2 \, x\right ) - 1}} \sin \left (2 \, x\right ) + a^{2} - 2 \, b^{2} + 4 \,{\left (a b - b^{2}\right )} \cos \left (2 \, x\right )\right ) + 4 \,{\left (a - b\right )} \sqrt{\frac{{\left (a - b\right )} \cos \left (2 \, x\right ) - a - b}{\cos \left (2 \, x\right ) - 1}} \sin \left (2 \, x\right )}{4 \,{\left (a^{3} - a^{2} b - a b^{2} + b^{3} -{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} \cos \left (2 \, x\right )\right )}}, -\frac{{\left ({\left (a - b\right )} \cos \left (2 \, x\right ) - a - b\right )} \sqrt{a - b} \arctan \left (-\frac{\sqrt{a - b} \sqrt{\frac{{\left (a - b\right )} \cos \left (2 \, x\right ) - a - b}{\cos \left (2 \, x\right ) - 1}} \sin \left (2 \, x\right )}{{\left (a - b\right )} \cos \left (2 \, x\right ) - b}\right ) + 2 \,{\left (a - b\right )} \sqrt{\frac{{\left (a - b\right )} \cos \left (2 \, x\right ) - a - b}{\cos \left (2 \, x\right ) - 1}} \sin \left (2 \, x\right )}{2 \,{\left (a^{3} - a^{2} b - a b^{2} + b^{3} -{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} \cos \left (2 \, x\right )\right )}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cot ^{2}{\left (x \right )}}{\left (a + b \cot ^{2}{\left (x \right )}\right )^{\frac{3}{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cot \left (x\right )^{2}}{{\left (b \cot \left (x\right )^{2} + a\right )}^{\frac{3}{2}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]